package com.lgkj.zhm.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.lgkj.zhm.mapper.DeviceOnlineMapper;
import com.lgkj.zhm.domain.DeviceOnline;
import com.lgkj.zhm.service.IDeviceOnlineService;

import javax.annotation.Resource;

/**
 * 设备在线情况Service业务层处理
 *
 * @author 代星登
 * @date 2021-02-22
 */
@Service
public class DeviceOnlineServiceImpl implements IDeviceOnlineService
{
    @Resource
    private DeviceOnlineMapper deviceOnlineMapper;

    /**
     * 查询设备在线情况
     *
     * @param id 设备在线情况ID
     * @return 设备在线情况
     */
    @Override
    public DeviceOnline selectDeviceOnlineById(Long id)
    {
        return deviceOnlineMapper.selectDeviceOnlineById(id);
    }

    /**
     * 查询设备在线情况列表
     *
     * @param deviceOnline 设备在线情况
     * @return 设备在线情况
     */
    @Override
    public List<DeviceOnline> selectDeviceOnlineList(DeviceOnline deviceOnline)
    {
        return deviceOnlineMapper.selectDeviceOnlineList(deviceOnline);
    }

    /**
     * 新增设备在线情况
     *
     * @param deviceOnline 设备在线情况
     * @return 结果
     */
    @Override
    public int insertDeviceOnline(DeviceOnline deviceOnline)
    {
        return deviceOnlineMapper.insertDeviceOnline(deviceOnline);
    }

    /**
     * 修改设备在线情况
     *
     * @param deviceOnline 设备在线情况
     * @return 结果
     */
    @Override
    public int updateDeviceOnline(DeviceOnline deviceOnline)
    {
        return deviceOnlineMapper.updateDeviceOnline(deviceOnline);
    }

    /**
     * 批量删除设备在线情况
     *
     * @param ids 需要删除的设备在线情况ID
     * @return 结果
     */
    @Override
    public int deleteDeviceOnlineByIds(Long[] ids)
    {
        return deviceOnlineMapper.deleteDeviceOnlineByIds(ids);
    }

    /**
     * 删除设备在线情况信息
     *
     * @param id 设备在线情况ID
     * @return 结果
     */
    @Override
    public int deleteDeviceOnlineById(Long id)
    {
        return deviceOnlineMapper.deleteDeviceOnlineById(id);
    }
}
